x86/vvmx: refactor nvmx_handle_vmclear()
authorSergey Dyasli <sergey.dyasli@citrix.com>
Wed, 14 Nov 2018 10:23:21 +0000 (10:23 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 14 Nov 2018 18:42:48 +0000 (18:42 +0000)
commit6f4c1f8a00cf19564cfaab3ab773988d580c4d66
treee61c4b7ffc2a4ff0e4cfc2a8e4aeeb1d8400a538
parentcd0476249729d37f9db1c01fbe50485ab30a5144
x86/vvmx: refactor nvmx_handle_vmclear()

1. Add VMX_INSN_VMCLEAR_WITH_VMXON_PTR errno and add the appropriate
   check to the function.

2. Correct the return value for not-4KB-aligned case and for invalid
   physaddr (when hvm_map_guest_frame_rw() fails).

3. Remove enum vmx_ops_result and use vmfail/vmsucceed() calls directly.

Signed-off-by: Sergey Dyasli <sergey.dyasli@citrix.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/vmx/vvmx.c
xen/include/asm-x86/hvm/vmx/vmcs.h